#include "stdafx.h"
#include "Receiver.h"
#include "ReceiveManager.h"
#include "FutOptRcvr.h"


CReceiver::CReceiver()
{
	m_Parent = NULL;
	Object = NULL;
	ObjectType = 0;
}


CReceiver::~CReceiver()
{
	if (Object)
	{
		delete Object;
		Object = NULL;
	}
}

void CReceiver::Execute()
{
	switch (ObjectType)
	{
	case 0:
		((CFutOptRcvr*)Object)->Request();
		break;
	case 1:
		break;
	default:
		break;
	}
}

void CReceiver::OnComplete()
{
	// Do something you want to do first.
	if (m_Parent)
	{
		m_Parent->OnComplete();
	}
}
